	<fieldset>
		<legend><?php echo $stage_name; ?></legend>
		
		<fieldset>
			<legend>Information</legend>
			
			<p>
				<strong>Stage name:</strong> <?php echo $stage_name; ?><br />
				<strong>Stage description:</strong> <?php echo $stage_description; ?><br />
			</p>
		</fieldset>
		
		
		<fieldset>
			<legend>Contributions</legend>
<?php if (count($contributions) != 0) : ?>
			<table>
				<tr>
					<th>Contrubution name</th>
					<th>Current status</th>
					<th>Done by</th>
				</tr>
<?php foreach ($contributions as $contribution) : ?>
				<tr>
					<td><?php echo $contribution['contribution_name'] ?></td>
					<td style="color: <?php echo $contribution['status'] ? '#090' : '#900' ?>"><?php echo $contribution['status'] ? 'Done' : 'Not done' ?></td>
					<td><?php echo $contribution['status'] ? $contribution['firstname'] . ' ' . $contribution['surname'] . ' on ' . $contribution['added_date'] : '<a href="' . site_url('home/participate_form/' . $stage_instance_id . '/' . $contribution['contribution_id']) . '">Add contribution</a>' ?></td>
				</tr>
<?php endforeach; ?>
			</table>
<?php endif; ?>
		</fieldset>
		
<?php if ($finish_button_activated): ?>
		<input type="button" value="Finish stage" onclick="javascript:document.location='<?php echo site_url('home/finish/' . $stage_instance_id); ?>';" />
<?php else: ?>
		<input type="button" value="Finish stage (Not all contributions are done)" disabled="disabled" />
<?php endif; ?>
	</fieldset>